import { ADD_NUMBER } from "./const.js";
const defaultState = {
    counter: 0
};
let reducer = function (state = defaultState, action) {
    switch (action.type) {
        case ADD_NUMBER:
            // let tmp = {...state}
            // tmp.counter = state.counter + action.number
            return {...state, counter: state.counter + action.number}
        default:
            return state
    }
}

export default reducer;
